package com.easepal.socketiolib;

/**
 * 作者: bright.lin@medisana.net.cn
 * 时间: 2018/12/6
 * 标题: 常量
 * 描述: 静态常量集合
 * 修改: 由 bright.lin@medisana.net.cn 修改于 2018/12/6
 */
interface Constants {

    // WebSocket地址-测试环境
    String SOCKET_URL_DEBUG = "http://121.43.115.207:9001";
    // WebSocket地址-正式环境
    String SOCKET_URL_RELEASE = "http://ws.aojiahuashare.com:9001";

    int ACTION_FAILURE = 0;
    int ACTION_SUCCESS = 1;

    // WebSocket连接状态-已连接
    int STATUS_CONNECTED = 1;
    // WebSocket连接状态-连接中
    int STATUS_CONNECTING = 2;
    // WebSocket连接状态-已断开
    int STATUS_DISCONNECTED = 3;

    String SOCKET_EVENT = "event";

    interface SocketOpt {
        boolean SOCKET_RECONNECTION = true;
        int SOCKET_RECONNECTION_ATTEMPTS = 5;
        long SOCKET_RECONNECTION_DELAY = 1000;
        long SOCKET_CONNECTION_TIMEOUT = 15000;
    }
}
